package com.yxw.yxnet_cd_center.customer_service.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author liuxin
 * @date 2023.10.08
 */
@Data
@TableName("yx_cs_file")
@ApiModel("文件实体")
public class YxCsFileEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "file_id",type = IdType.ASSIGN_ID)
    @ApiModelProperty("附件ID")
    private Long id;

    @TableField("obj_id")
    @ApiModelProperty("对应主体ID")
    private Long objId;

    @TableField("file_name")
    @ApiModelProperty("文件名称")
    private String fileName;

    @TableField("file_size")
    @ApiModelProperty("文件大小")
    private Long fileSize;

    @TableField("file_url")
    @ApiModelProperty("上传路径")
    private String fileUrl;

    @TableField("file_type")
    @ApiModelProperty("文件后缀名")
    private String fileType;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    @ApiModelProperty("上传时间")
    private Date createTime;

    @TableField("create_id")
    @ApiModelProperty("上传人ID")
    private Long createId;

    @TableField("create_name")
    @ApiModelProperty("上传人")
    private String createName;

    @TableField("object_key")
    @ApiModelProperty("存储objectKey")
    private String objectKey;
}